//1486. 数组异或操作

#include <vector>
using namespace std;

class Solution 
{
public:
    int xorOperation(int n, int start) 
    {
        vector<int> v;
        int ret = 0;
        for(int i = 0; i < n; i++)
        {
            v.push_back(start + 2 * i);
            if(i > 0) ret ^= v[i];
        }
        ret ^= v[0];
        return ret;
    }
};